//
//  NYUserLoginForm.m
//  NiuWaJiaoYu
//
//  Created by MinLison on 2017/11/3.
//  Copyright © 2017年 niuwaketang. All rights reserved.
//

#import "NYUserLoginForm.h"
#import "NYUserFormSMSCell.h"
#import "NYUserFormSubmitCell.h"
#import "NYUserFormPhoneCell.h"
#import "ISO3166CountryValueTransformer.h"
#import "NYUserPwdCell.h"
#import "NYUserFindPwdCell.h"
#import "NYUserWebCatLoginCell.h"
#import "NYUserFormUserRegisterCell.h"
@implementation NYUserLoginForm
- (NSArray *)fields
{
        return @[
                 @{FXFormFieldKey : @keypath(self,mobile), FXFormFieldTitle : @"", FXFormFieldCell : [NYUserFormPhoneCell class], FXFormFieldPlaceholder : @"请输入手机号码"},
                 @{FXFormFieldKey : @keypath(self,password), FXFormFieldTitle : @"", FXFormFieldCell : [NYUserPwdCell class], FXFormFieldPlaceholder : @"请输入密码"},
                 ];
}
- (void)setCountry_code:(NSString *)country_code
{
        _country_code = country_code;
        NYUserManager.country_code = country_code;
}
- (void)setMobile:(NSString *)mobile
{
        _mobile = mobile;
        NYUserManager.mobile = mobile;
}
- (void)setSms_code:(NSString *)sms_code
{
        _sms_code = sms_code;
        NYUserManager.sms_code = sms_code;
}
- (void)setPassword:(NSString *)password
{
        _password = password;
        NYUserManager.password = password;
}
- (NSArray *)extraFields
{
        return @[
                 @{FXFormFieldTitle : @"findPwd", FXFormFieldCell : [NYUserFindPwdCell class], FXFormFieldAction: @"findPwd"},
                 @{FXFormFieldKey : @"login", FXFormFieldTitle : @"登录", FXFormFieldCell : [NYUserFormSubmitCell class], FXFormFieldAction: @"phoneLogin"},
                 @{FXFormFieldKey : @"userRegister", FXFormFieldTitle : @"您还木有账号，立即去注册>", FXFormFieldCell : [NYUserFormUserRegisterCell class], FXFormFieldAction: @"userRegister"}
                 ];
}
@end
